1. Field of the Invention
Embodiments of the present invention relate to the field of web based control components. More particularly, embodiments of the present invention relate to the graphical simulation of hypertext markup language control components.
2. Related Art
Network environments allow a worldwide collection of networks (e.g., the Internet) and users on those networks to communicate with each other. Users accessing the Internet through a web browser can access and interact with content from web sites that are located on the Internet. Web sites located on the Internet comprise a group of related documents, associated files, script routines, and databases. A server manages and controls the websites that are associated with the server to present content within the websites to the accessing users.
The content provided within the web page is created using hypertext markup language (HTML). The HTML language uses tags to mark elements (e.g., text and graphics) in a document to provide a layout for displaying the content to web browsers that are associated with users requesting the web page contents.
Web pages can allow for interaction between a user and the content within the web page. For example, surveys or informational displays may be presented to a user for their input. Control widgets or components that are HTML based can be used for displaying and allowing a user to manipulate a data parameter, that is associated with an object, within a web page. Two control widgets that are HTML based are checkboxes and radiobuttons. Ordinarily, the checkbox and radiobutton control widget is implemented in standard HTML by the use of an INPUT tag with the TYPE attribute value set to the value of checkbox or radiobutton, respectively.
Standard HTML control widgets are limited to two conditions, such as, the Boolean conditions of true and false. As a drawback, a web page implementing a parameter for manipulation by a checkbox or radiobutton implemented in standard HTML cannot express a situation beyond the two conditions.
For example, checkbox widgets are designed for displaying and allowing a user to manipulate a data parameter that either exhibits a true or false condition. It is not normally considered possible for both true and false to be presented simultaneously, at least, when displaying or allowing the manipulation of properties of a single data parameter. For example, in the case of a single object, a checkbox can be used to determine whether that object, a person, has obtained a graduate degree. A checkbox is adequate for showing a true or false condition of whether or not the person has graduate degree.
Mixed value or partially true situations can arise for checkboxes on a system (e.g., survey) where more than one object can be selected by the user, and where a screen showing the data parameter of those objects can be invoked. Consider an example where each selectable person object is associated with a data parameter expressing whether that person has a graduate degree, or not. In the case where person A has a degree and person B does not have a graduate degree, a property screen can display and allow manipulation of a data parameter related to those objects. If the objects include person A and B, the data parameter relating to attaining a graduate degree would need to reflect a partially true situation, since only A has a graduate degree. In order to present the information correctly, the checkbox needs to show that the data parameter relating to attaining a graduate degree is both true and false, a mixed value situation.
In another case, radiobutton control widgets are designed for displaying and allowing a user to manipulate a data parameter that can have only one of a few possible spelled-out choice values (e.g., 1 of N choices). This is accomplished by presenting a list of the N choices in a radiobutton set. In standard HTML systems, an indicator next to each choice suggests either that the choice is the current choice (true) or is not the current choice (false). It is not normally considered possible for more, or less, than one choice in a radiobutton set to have a true condition associated with it, at least when displaying or allowing manipulation of parameters of a single object.
Mixed value situations can arise for radiobutton sets on a system where more than one object is considered by a user in a radiobutton set. The user manipulates a screen showing the choices associated with the radiobutton set where a selection can be invoked. Considering an example where a selectable color parameter has the choices of red, white, or blue, and where the color parameter is normally displayed and manipulated using a radiobutton set.
In the case where two objects, objects A and B, are considered in a radiobutton set, object A may have the color red and object B may have the color blue. When the user's selection includes both objects A and B for the color parameter, a mixed value situation arises in the radiobutton set displaying the color parameter. In order to present the information correctly, the radiobutton set needs to show that both red and blue are non-exclusively true, such that, each color is true for certain objects. In this case, the color white would be definitely false since none of the objects are white.
In addition, searching algorithms within a program are used to search for objects within a document object model (DOM). Generally this employs a methodical and sequential searching technique to locate an object of interest within the DOM. The technique usually scans the document and compares each of the objects within the DOM to the object of interest until the object is found within the DOM.
Execution of the searching algorithm within a JavaScript program can be slow and inefficient. For example, the hand-coded searching algorithm must perform its sequential and methodical search as implemented in the interpreted JavaScript environment.
Also, multiple hand coded lines within the program are necessary to implement the searching algorithm. Since the searching algorithm is hand coded, the traditional method involves code which increases the size of the program, its complexity, and the likelihood of bugs or errors in implementation.
As such, standard HTML control widgets are inapplicable in partially true or mixed value situations since they are unable to express conditions beyond Boolean expressions of true and false conditions. Also, traditional methods of searching for objects in a DOM are slow, and because of the multiple lines of code, subject to implementation errors.